package com.example.day20_zhongji.presenter;


import com.example.day20_zhongji.bean.ArticleBean;
import com.example.day20_zhongji.bean.BannerBean;
import com.example.day20_zhongji.model.AritcleCallBack1;
import com.example.day20_zhongji.model.AritcleModel1;
import com.example.day20_zhongji.view.ArticleView1;

public class ArticlePresenter1 implements AritcleCallBack1 {
    private AritcleModel1 model;
    private ArticleView1 view1;

    public ArticlePresenter1(ArticleView1 view1) {
        this.view1 = view1;
        this.model=new AritcleModel1();
    }
    public void getdata(){
        model.aritcleModel(this);
    }
    @Override
    public void onSuccess(ArticleBean data) {
        view1.onSuccess(data);
    }

    @Override
    public void onFali(String error) {
        view1.onFali(error);
    }

    @Override
    public void onSuccess(BannerBean data) {
        view1.onSuccess(data);
    }

    @Override
    public void onFali1(String error) {
        view1.onFali1(error);
    }
}
